<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
            <html lang="zh-CN">

            <head>
             <base href="<%=basePath%>">
                <meta charset="UTF-8">
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <meta http-equiv="X-UA-Compatible" content="ie=edge">
                <title>管理员页面</title>
                <link rel="stylesheet" href="<%=basePath%>/css/admin_css/admin_index_css.css">
            </head>

            <body>
                <div id="main_box">
                    <div id="left_box">
                        <h3> 一号店后台管理系统</h3>
                        <div id="left_header">
                            <img src="img/admin_img/admin_index_img/test.jpg" />
                            <br/>
                            <span for="">Admin</span>
                        </div>
                        <div id="left_navigation">
                            <h4>
                                功能不全暂时没有二级菜单
                            </h4>
                        </div>
                    </div>
                    <div id="right_box1">
                        <div class="right_header">
                            <h2>一号店商户列表信息</h2>
                            用户管理 :
                            <select name="shopType" class="m-wrap">
                                <option value="0">请选择</option>
                                <option value="shop">商户列表</option>
                                <option value="user">申请列表</option>
                            </select>
                            <button id="search">查&nbsp;询</button>
                        </div>
                        <div id="right_buttom1">
                            <table id="table1">
                                <tr>
                                    <th>商户账号</th>
                                    <th>商户昵称</th>
                                    <th>商户地址</th>
                                    <th>身份证号</th>
                                    <th>商户性别</th>
                                    <th>商户姓名</th>
                                    <th>操作</th>
                                </tr>
                                <c:forEach var="shops" items="${userList}">
                                    <tr>
                                        <td class="userId">${shops.loginId}</td>
                                        <td>${shops.nickname}</td>
                                        <td>${shops.address}</td>
                                        <td>${shops.identityCard}</td>
                                        <td>${shops.sex}</td>
                                        <td>${shops.realname}</td>
                                        <c:choose>
                                            <c:when test="${shops.userStatus == 'common'}">
                                                <td>
                                                    <button class="shopOperation">封禁商户</button>
                                                </td>
                                            </c:when>
                                            <c:when test="${shops.userStatus == 'confine3d'}">
                                                <td>
                                                    <button class="shopOperation">正常登录</button>
                                                </td>
                                            </c:when>
                                        </c:choose>
                                    </tr>
                                </c:forEach>
                            </table>
                            <table id="table2">
                                <tr>
                                    <th>商户账号</th>
                                    <th>商户昵称</th>
                                    <th>商户地址</th>
                                    <th>身份证号</th>
                                    <th>商户性别</th>
                                    <th>商户姓名</th>
                                    <th>操作</th>
                                </tr>
                                <c:forEach var="license" items="${licenseList}">
                                    <tr>
                                        <td class="userId">${license.loginId}</td>
                                        <td>${license.nickname}</td>
                                        <td>${license.address}</td>
                                        <td>${license.identityCard}</td>
                                        <td>${license.sex}</td>
                                        <td>${license.realname}</td>
                                        <td>
                                            <button id="audit">审&nbsp;核</button>
                                        </td>
                                    </tr>
                                </c:forEach>
                            </table>
                            <button id="excel">导出成Excel</button>
                        </div>

                    </div>
                    <div id="right_box2">
                        <div class="right_header">
                            <h2>一号店商户列表信息</h2>
                        </div>
                        <ul>
                            <li id="userId" value="${license.userId}">申请人编号:${license.userId}</li>
                            <li>营业执照:${license.licenseId}</li>
                            <li>证件照片:
                                <img src="${license.cardImgUrl}" />
                            </li>
                            <li>申请时间:${license.establishTime}</li>
                            <li>
                                <button class="yes_no" value="yes">申请通过</button>
                                <button class="yes_no" value="no">申请驳回</button>
                            </li>
                        </ul>
                    </div>
                </div>
            </body>
            <script src="<%=basePath%>/js/jquery-3.2.1.min.js" type="text/javascript"></script>
            <script src="<%=basePath%>/js/jquery.table2excel.js"></script>
            <script src="<%=basePath%>/js/admin_js/admin_index_js.js"></script>
            <script src="<%=basePath%>/js/admin_js/admin_excel.js"></script>

            </html>